import { defineStore } from 'pinia'

export const useUserStore = defineStore({
    id: 'user',
    state: () => ({
        userInfo: {
            department: '',
            group: '',
            role: '',
            name: '',
            employeeId: '',
            status: ''
        },
        // 添加水印透明度状态
        watermarkOpacity: 0.2 // 默认值
    }),
    actions: {
        setUserInfo(userInfo: any) {
            this.userInfo = userInfo
        },
        // 添加设置水印透明度的方法
        setWatermarkOpacity(opacity: number) {
            this.watermarkOpacity = opacity
        }
    }
})